/**
 * 浏览器工作流 - 弹出窗口样式
 */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  width: 380px;
  min-height: 480px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #333;
}

.container {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.header {
  background: rgba(255, 255, 255, 0.95);
  padding: 20px;
  text-align: center;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.logo {
  width: 48px;
  height: 48px;
  margin-bottom: 10px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.header h1 {
  font-size: 18px;
  font-weight: 600;
  color: #2c3e50;
  margin: 0;
}

.main-content {
  flex: 1;
  padding: 20px;
  background: rgba(255, 255, 255, 0.95);
}

/* 工作流操作区域 */
.workflow-section {
  margin-bottom: 25px;
}

.workflow-section h2 {
  font-size: 16px;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 15px;
  text-align: center;
}

/* 录制控制 */
.record-control {
  margin-bottom: 20px;
  text-align: center;
}

.record-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 15px 20px;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

.record-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(40, 167, 69, 0.5);
}

.record-btn.recording {
  background: linear-gradient(135deg, #dc3545 0%, #fd7e14 100%);
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

.record-icon {
  font-size: 18px;
}

.record-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 13px;
  color: #6c757d;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6c757d;
  transition: all 0.3s ease;
}

.status-dot.recording {
  background: #dc3545;
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* 导出区域 */
.export-section {
  background: rgba(40, 167, 69, 0.1);
  padding: 15px;
  border-radius: 8px;
  border-left: 4px solid #28a745;
  margin-bottom: 20px;
}

.export-buttons {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.export-buttons .primary-btn {
  flex: 2;
}

.cancel-btn {
  flex: 1;
  padding: 12px 16px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.cancel-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(220, 53, 69, 0.4);
  background: linear-gradient(135deg, #c82333 0%, #a71e2a 100%);
}

.export-info {
  font-size: 13px;
  color: #28a745;
  text-align: center;
  margin-top: 8px;
  font-weight: 500;
}

/* 回放控制 */
.playback-section {
  margin-bottom: 20px;
}

.playback-info {
  margin-top: 8px;
  text-align: center;
}

.playback-info small {
  font-size: 12px;
  color: #6c757d;
  line-height: 1.4;
}

/* 回放配置显示 */
.playback-config {
  margin-top: 12px;
  padding: 12px;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  font-size: 12px;
}

.config-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.config-item:last-child {
  margin-bottom: 0;
}

.config-label {
  color: #495057;
  font-weight: 500;
}

.config-value {
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

/* 配置区域 */
.config-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

/* 按钮样式 */
.primary-btn, .secondary-btn {
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.primary-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.primary-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5);
}

.primary-btn:disabled {
  background: #6c757d;
  cursor: not-allowed;
  opacity: 0.6;
}

.secondary-btn {
  background: rgba(108, 117, 125, 0.1);
  color: #6c757d;
  border: 1px solid rgba(108, 117, 125, 0.2);
}

.secondary-btn:hover {
  background: rgba(108, 117, 125, 0.15);
  color: #495057;
}

/* 状态样式 */
.status {
  text-align: center;
  padding: 12px;
  background: rgba(40, 167, 69, 0.1);
  border-radius: 6px;
  border-left: 4px solid #28a745;
  transition: all 0.3s ease;
}

.status.status-success {
  background: rgba(40, 167, 69, 0.1);
  border-left-color: #28a745;
}

.status.status-error {
  background: rgba(220, 53, 69, 0.1);
  border-left-color: #dc3545;
}

.status.status-warning {
  background: rgba(255, 193, 7, 0.1);
  border-left-color: #ffc107;
}

.status.status-info {
  background: rgba(23, 162, 184, 0.1);
  border-left-color: #17a2b8;
}

#status-text {
  font-size: 13px;
  font-weight: 500;
  color: #28a745;
}

.status.status-success #status-text {
  color: #28a745;
}

.status.status-error #status-text {
  color: #dc3545;
}

.status.status-warning #status-text {
  color: #e0a800;
}

.status.status-info #status-text {
  color: #17a2b8;
}

/* 响应式调整 */
@media (max-width: 350px) {
  body {
    width: 320px;
  }
  
  .container {
    padding: 0;
  }
  
  .main-content {
    padding: 15px;
  }
} 